#include "spi.h"
#include "c8051f3xx.h"

// Writes a byte to the SPI interface
void spi_write_byte(unsigned char byte)
{
	while (TXBMT==0) // Wait for the transmit buffer to be safe to write to
	{}
	// Writing data to the SFR SPI0DAT initiates a SPI transfer
	SPI0DAT = byte;
}

